<%! import cgi %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>${self.title()}</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <meta name="generator" content="Peerscape" />
        <meta http-equiv="imagetoolbar" content="no" />

        <script type="text/javascript" src="/static/js/jquery.min.js"></script>
        <script type="text/javascript" src="/static/js/hoverIntent.js"></script> 
        <script type="text/javascript" src="/static/js/peerscape.js"></script>
        
        <style type="text/css">
            <!-- 
            @import url(/static/css/core.css);
            @import url(/static/css/content.css);
            -->
        </style>
        <link rel="shortcut icon" type="image/x-icon" href="http://p2p-fusion.org/favicon.ico" />

        ${self.head()}
    </head>
    <body class="${self.body_class().strip()}">
        <div id="wrapper">
            <div id="inner">
                <div id="topLinks">
                    <div class="inner">
                        <ul>
                            <li id="peerscape" ${top_li_class('peerscape')}>
                                <span id="peerscapeLink">${_('Links')}</span>
                                <ul>
                                    <li><a href="http://71d907d9fba38a6107449a68c12b421ac541bca2.hexlabel.net/">${_('Public Wall')}</a></li>
                                    <li><a href="http://57453a4b85508565d9cf63ab5457fb73f456f24c.hexlabel.net/">${_('Peerscape Users')}</a></li>
                                    <li><a href="http://peerscape.org/">${_('Peerscape Web Site')}</a></li>
                                </ul>
                            </li>
                            <li ${top_li_class('admin')}><a id="admin" href="http://admin.hexlabel.net/">${_('System')}</a></li>
                            <li ${top_li_class('user')}><a id="user" href="http://my.hexlabel.net/">${global_props['my_name']}</a></li>
                        </ul>
                        <div class="clr"><br/></div>
                    </div>
                </div>

                <div id="main">
                    <div class="inner">
                        <div id="header">
                            <div class="left">
                                <h1 id="logo"><a href="http://my.hexlabel.net/" accesskey="1">Peerscape</a></h1>
                                <h2 id="subtitle">
                                    The Peer-to-Peer Social Network
                                    ${self.extra_subtitle_content()}
                                </h2>
                            </div>
                            <div class="right">
                                <div id="notifications">
                                    <div class="inner">
                                        ${self.notifications()}
                                    </div>
                                </div>
                            </div>
                            <div class="clr"><br/></div>
                        </div>

                        <div id="contentHolder">
                            ${self.body()}
                            <div class="clr"><br/></div>
                        </div>
                    </div>
                </div>
    
                <div id="footer">
                    <div class="left">
                    </div>
                    <div class="right">
                    </div>
                    <div class="clr"><br/></div>
                </div>
            </div>
        </div>
    </body>
</html>

<!-- default defs -->
<%def name="title()">P2P Fusion - Peerscape</%def>
<%def name="head()"></%def>
<%def name="top_li_class(link)">
    % if (link == 'admin' and is_admin_section) or (link == 'user' and is_self):
        class="selected"
    % endif
</%def>
<%def name="body_class()">base</%def>
<%def name="toplinks_style()"></%def>
<%def name="extra_subtitle_content()"></%def>
<%def name="notifications()">
</%def>

<!-- helpers -->
<%def name="nl2br(s)">
    ${'<br/>'.join(cgi.escape(s).split("\n")) | n}
</%def>

